MySQL date data type and time type usage summary MySQL date type: Date format, storage space occupied, date range comparison.
Date type storage space date format date range
-----------------------------------------------------------------------------
MySQL date type: Date Format, storage space occupied, and date range comparison.Date type storage space date format date range-----------------------------------------------------------------------------------Datetime 8 bytes YYYY-MM-DD hh: mm: SS 10
MySQL Date TypeMySQL Date Type: Date format, occupied storage space, date range comparison.Date type storage space Date format date range------------ --------- --------------------- -----------------------------------------DateTime 8 bytes
MySQL timestampdiff () functions are much more powerful than datediff () functions. datediff () can only calculate the number of days for the difference between two dates.
Mysql common date addition and subtraction functions and instance
Turn from:http://blog.chinaunix.net/space.php?uid=11327712&do=blog&id=32416MySQL Date Type: Date format, occupied storage space, date range comparison.Date type storage space date format date range-----------------------------------------------------
Mysql date function bitsCN.com does not say anything, first record an SQL
Select uid, rank, money, e, from_unixtime (time/1000) from stats_2012_01_19 where comm = 8888 and e> 40 and from_unixtime (time/1000) between '2017-01-19 00:00:00 'and '2017-01
MySQL Common date addition and subtraction function and example tutorialMySQL Date TypeMySQL Date Type: Date format, occupied storage space, date range comparison.Date type storage space Date format date range------------ --------- ---------------
In PHP website development, the date and time fields in Mysql database design are essential because the date format output by Mysql date functions is not compatible with the date format between PHP date functions, in PHP website development, the
Summary of MySQL date and time functions bitsCN.com
Mysql database date and time functions, mysql function Daquan, summary record, for later use.
DAYOFWEEK (date)The return date is the day of the week (1 = Sunday, 2 = Monday ,...... 7 = Saturday,
PHP date query function code
Date_default_timezone_set ('prc'); // Default time zone
Echo "today:", date ("Y-m-d", time ()),"";
Echo "today:", date ("Y-m-d", strtotime ("18 Jun 2008 ")),"";
Echo
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.